﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ForumPostThanksAdmin.ascx.cs" Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.ForumPostThanksAdmin" %>

<owc:OwGrid ID="ForumPostThanksAdminGrid" runat="server" SkinID="OwGridAdmin" AutoGenerateColumns="False"
    CellSpacing="0" DataSourceID="ForumPostThanksAdminOds" GridLines="None"
    OwEnableMessageDisplay="True" OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="ForumPostThanksAdminOds" DataKeyNames="ForumPostThanksID" >
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>" RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("ForumPostThanksID") %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b><i>
                                    <%# OwForumPostsBLL.OwGetEntity(Eval("ForumPostID").OwToInt64TryParseReturn0()).Title %></i>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="UserOwR" OwText="UserLabel" runat="server"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("UserID") != null ? (Membership.GetUser(Eval("UserID")) != null ? Membership.GetUser(Eval("UserID")).UserName : "n/a") : "n/a"%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table width="100%">                                                        
                        <tr>
                            <td>
                                <owc:OwR ID="DateTimeThankedOwR" OwText="DateTimeThankedLabel" runat="server"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("DateTimeThanked").OwToDateTimePublishDate()%>
                            </td>
                        </tr>                              
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/ForumPostThanksEdit.aspx?ID=<%#Eval("ForumPostThanksID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" alt="" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%--<asp:ImageButton CausesValidation="true" onClientClick='if(!confirm("Are you sure to  Delete?")) return false' 
                    ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton" ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />--%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("BlogsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="ForumPostThanksAdminOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwForumPostThanksEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" 
    OldValuesParameterFormatString="original_{0}" EnablePaging="True" 
    SelectCountMethod="OwGetByDynamicCount" 
    SelectMethod="OwGetByDynamic" 
    TypeName="Micronet.OpenWeb.Com.BLL.OwForumPostThanksBLL" UpdateMethod="OwUpdate">
    <DeleteParameters>
        <asp:Parameter Name="forumPostThanksID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter DbType="Guid" Name="userID" />
        <asp:Parameter Name="forumPostID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>